import React, { Component } from 'react'
import "./Tworef.css"

export default class Tworef extends Component {
    fn = ()=>{
        console.log();
       let value =  this.input.value
       this.div.innerHTML=value
    }
  
    render() {
       
        return (
            <div>     <input onChange={this.fn} ref={(el)=>{
                this.input=el

            }} type="text" name="" id="" className='in' />
                <button className='button' >点我提交吧</button>
                <div ref={(el)=>{
                    this.div=el

                }} className='box'></div>
                </div>
        )
    }
}
